﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="wfRegUserInfoFill.aspx.cs" Inherits="msBsc.WebUi.Custom.wfRegUserInfoFill" %>

<!DOCTYPE HTML>
<html>
<head id="Head1" runat="server"> 
    <title>优速购商城会员注册信息填写</title>
    <link rel="shortcut icon" href="/themes/Style1/Image/favicon.ico" type="image/x-icon" />
    <link rel="stylesheet" href="/??themes/Style1/StyleQt.css,themes/Style1/reg2.css," />  
    <script src="/??jqPlugin/js/jquery-1.8.3.min.js,js/jBase.js,js/jBPage.js,themes/Style1/jsQt.js" type="text/javascript"></script>
    <!--head fix rgn--> 
    <script type="text/javascript">
        $(window).load(function () {
            validateStep();

            //            $.ploadFile("Tip", function (script, textStatus) {
            //                $('#J_Password').poshytip({
            //                    content: "<span style='font-weight:bold;' class='f14'>←允许5-16个字符，可用数字、字母、下划线</span>",
            //                    showOn: 'none',
            //                    alignTo: 'target',
            //                    alignX: 'right',
            //                    alignY: 'center',
            //                    offsetX: 5,
            //                    showTimeout: 100
            //                });
            //                $('#J_RePassword').poshytip({
            //                    content: "<span style='font-weight:bold;' class='f14'>←再次输入你的登录密码</span>",
            //                    showOn: 'none',
            //                    alignTo: 'target',
            //                    alignX: 'right',
            //                    alignY: 'center',
            //                    offsetX: 5,
            //                    showTimeout: 100
            //                });
            //                $('#J_Nick').poshytip({
            //                    content: "<span style='font-weight:bold;' class='f14'>←允许5-16个字符，可用中文、数字、字母、下划线</span>",
            //                    showOn: 'none',
            //                    alignTo: 'target',
            //                    alignX: 'right',
            //                    alignY: 'center',
            //                    offsetX: 5,
            //                    showTimeout: 100
            //                });
            ////                $('#txtTel').poshytip({
            ////                    content: "<span style='font-weight:bold;' class='f14'>←填写手机号，可为空！</span>",
            ////                    showOn: 'none',
            ////                    alignTo: 'target',
            ////                    alignX: 'right',
            ////                    alignY: 'center',
            ////                    offsetX: 5,
            ////                    showTimeout: 100
            ////                });
            //            });
            //            $("#J_Password").blur(function () {
            //                doValidateReg(this.id);
            //            }).focus(function () {
            //                $(this).poshytip('show');
            //            });
            //            $("#J_RePassword").blur(function () {
            //                doValidateReg(this.id);
            //            }).focus(function () {
            //                $(this).poshytip('show');
            //            });
            //            $("#J_Nick").blur(function () {
            //                doValidateReg(this.id);
            //            }).focus(function () {
            //                $(this).poshytip('show');
            //            });
            //            $("#txtTel").blur(function () {
            //                doValidateReg(this.id);
            //            }).focus(function () {
            //                $(this).poshytip('show');
            //            });

            $("#J_BtnInfoForm").click(function () {
                if (getAllValiInp()) {
                    var _jsParam = new jsonRow();
                    _jsParam.AddCell("ACTION", "REGIST_STEP2");
                    _jsParam.AddCell("EMAIL", $("#spnMailNme").html());
                    _jsParam.AddCell("PASS1", $("#J_Password").val());
                    _jsParam.AddCell("PASS2", $("#J_RePassword").val());
                    _jsParam.AddCell("USER_NME", $("#J_Nick").val());
                    _jsParam.AddCell("USER_TEL", $("#txtTel").val());
                    _jsParam.AddCell("QQ_NO", $("#txtQQ").val());
                    _jsParam.AddCell("PROMOTION_NME", $("#txtPROMOTION_NME").val());
                    ajaxComm(_jsParam);
                }
            });
            setAllValiInp();
            setValiInp("J_Password", null, function (_domVc) {
                var patten = new RegExp("^([a-zA-Z0-9_]){5,15}$");
                return patten.test($(_domVc).val());
            });
            setValiInp("J_RePassword", null, function (_domVc) {
                var patten = new RegExp("^([a-zA-Z0-9_]){5,15}$");
                return patten.test($(_domVc).val()) && $(_domVc).val() == $("#J_Password").val();
            }); 
        });


//        function doValidateReg(ctId) {
//            var blRight = true;
//            if (!ctId || ctId == "J_Password") {
//                var patten = new RegExp("^([a-zA-Z0-9_]){5,15}$"); 
//                if (!patten.test($("#" + "J_Password").val())) {
//                    showValidateMsg("J_Password", "允许5-16个字符，可用数字、字母、下划线！", true);
//                    blRight = false;
//                } else {
//                    showValidateMsg("J_Password", "", false);
//                } 
//            }
//            if (!ctId || ctId == "J_RePassword") {
//                var patten = new RegExp("^([a-zA-Z0-9_]){5,15}$"); 
//                if (!patten.test($("#" + "J_RePassword").val()) || $("#" + "J_Password").val() != $("#" + "J_RePassword").val()) {
//                    showValidateMsg("J_RePassword", "请输入正确的确认密码，必须和上面的密码一致！", true);
//                    blRight = false;
//                } else {
//                    showValidateMsg("J_RePassword", "", false);
//                }
//            }
//            if (!ctId || ctId == "J_Nick") {
//                var patten = new RegExp("^([\u4E00-\uFA29]|[\uE7C7-\uE7F3]|[a-zA-Z0-9_]){5,15}$"); 
//                if (!patten.test($("#" + "J_Nick").val())) {
//                    showValidateMsg("J_Nick", "允许5-16个字符，可用中文、数字、字母、下划线！", true);
//                    blRight = false;
//                } else {
//                    showValidateMsg("J_Nick", "", false);
//                }
//            }
//            if (!ctId || ctId == "txtTel") {
//                var patten = new RegExp("^1[0-9]{10}$");
////                var patten = new RegExp("^13[0-9]{1}[0-9]{8}$|^15[036789]{1}[0-9]{8}$|^18[89]{1}[0-9]{8}$");
//                if ($("#" + "txtTel").val()&&$("#" + "txtTel").val()!=''&&!patten.test($("#" + "txtTel").val())) {
//                    showValidateMsg("txtTel", "请输入正确的手机号！", true);
//                    blRight = false;
//                } else {
//                    showValidateMsg("txtTel", "", false);
//                }
//            }
//            return blRight;
//        };
//        function showValidateMsg(msgId, msgtxt, blErr) {
//            if (blErr) {
//                $('#' + msgId).poshytip('update', "<span style='color:red;font-weight:bold;' class='f14'>" + msgtxt + "</span>").poshytip('show');
//            } else {
//                $('#' + msgId).poshytip('update', "<span style='color:blue;font-weight:bold;' class='f14'>√</span>").poshytip('show');
//            }
//        };

        function validateStep() {
            var regcurrmail = LS.get("CURR_REG_MAIL");
            if (!regcurrmail || regcurrmail == '') {
                window.location.href = '/c_RegMailFill.htm';
            } else {
                var regcurrstep = LS.get(regcurrmail);
                if (regcurrstep == "STEP1") {
                    window.location.href = '/c_RegMailSend.htm';
                }
                if (regcurrstep == "STEP3") {
                    window.location.href = '/c_RegSuccess.htm';
                }
                var regcurrdt = LS.get(regcurrmail + "_RDT");
                if (!regcurrdt || parseInt(((new Date()) - Date.parse(regcurrdt)) / (1000 * 60 * 60)) > 24) {
                    reRegister();
                }

                $("#spnMailNme").html(regcurrmail);
            }
        };


        function reRegister() {
            var regcurrmail = LS.get("CURR_REG_MAIL");
            if (regcurrmail && regcurrmail != '') {
                LS.remove("CURR_REG_MAIL");
                LS.remove(regcurrmail);
                LS.remove(regcurrmail + "_RDT");
            }
            window.location.href = '/c_RegMailFill.htm';
        };
    </script> 
</head>
<body > 
    <div id="mallPage" class="tms-page mallAct tmall-  page-not-market">
        <!-- -->
        <!--商城通用顶通-->
        <%=new msBsc.WebUi.Code.QtHtmlGet().GetHeaderTopHtml()%>
        <%=new msBsc.WebUi.Code.QtHtmlGet().GetHeaderLogoHtml()%>

        



<div class="page lang-zh-S" style=" background-color:#fff; margin-top:10px; padding:10px;">

		 


		<div class="steps">
	<ol>
		<li  class="active" ><i>1</i><span class="tsl" >设置登录名</span></li>
		<li  class="active" ><i>2</i><span class="tsl" >填写账户信息</span></li>
		<li ><i >3</i><span class="tsl" >注册成功</span></li>
	</ol>

	</div>
	
	<div class="content">
		<div class="form-list form-main-list">
			<form method="post" action="#" id="J_InfoForm">
				<input type="hidden" name="action" value="reg/reg_action" />
					
					<div class="form-group">
											<div class="form-item">
							<span class="form-label form-label-b tsl" >登录名</span>
							<span id="spnMailNme"></span> <a style=" margin-left:10px;"  href="javascript:void(0);return false;" class="tsl" onclick="reRegister();" target="_self">更换邮箱重新注册</a>
						</div>
										</div>
					<div class="form-group">
						<div class="form-item">
							<span class="form-label form-label-b tsl" >设置登录密码</span>
							<span class="tsl" >登录时验证，保护账户信息</span>
						</div>
						<div class="form-item">
							<span class="form-label tsl" >登录密码</span>
							<input class="form-text" id="J_Password" name="pwd" type="password"  right-msg="允许5-16个字符，可用数字、字母、下划线"  value="" /> 
							
							<%--
							<div class="pw-tip" id="J_PwdTip" style="display:none;">
								<i class="pw-tip-arr"></i>
								<div class="pw-tip-bd">
									<div class="pw-strength">
										<span class="tsl" data-phase-id="r_ui_pwd_strength">安全程度：</span>
										<div class="pw-strength-bar">
											<span class="pw-strength-1"></span>
											<span class="pw-strength-2"></span>
											<span class="pw-strength-3"></span>
											<em></em>
										</div>
									</div>
									<div class="pw-rule">
										<div class="pw-rule-item pw-rule-length">
	                                        <i class="iconfont">&#xe611;</i><span class="tsl" data-phase-id="r_ui_pwdLengthTip">6-20个字符</span>
										</div>
										<div class="pw-rule-item pw-rule-legal">
	                                        <i class="iconfont">&#xe611;</i><span class="tsl" data-phase-id="r_ui_pwdCharacterTip">只能包含字母、数字以及标点符号（除空格）</span>
										</div>
										<div class="pw-rule-item pw-rule-multi">
	                                        <i class="iconfont">&#xe611;</i><span class= "tsl" data-phase-id="u_ui_pwdStengthTip">字母、数字和标点符号至少包含2种</span>
										</div>
									</div>
								</div>
							</div>--%>
						</div>
						
						<div class="form-item">
							<span class="form-label tsl"  >再次确认</span>
							<input class="form-text" id="J_RePassword"  right-msg="确认密码必须和上面的一致"
								name="confirmPwd" type="password"   value="" /> 
						</div>
					</div>
					<div class="form-group">
						<div class="form-item">
							<span class="form-label form-label-b tsl" >设置会员信息</span>
						</div>
						<div class="form-item">
							<span class="form-label tsl"  >会员名</span>
							<input class="form-text vali-inp" id="J_Nick" name="nick"  reg-exp="^([\u4E00-\uFA29]|[\uE7C7-\uE7F3]|[a-zA-Z0-9_]){5,15}$" right-msg="允许5-16个字符，可用中文、数字、字母、下划线" type="text" value="" /> 
						</div>
						<div class="form-item">
							<span class="form-label tsl"  >手机号</span>
							<input class="form-text vali-inp" id="txtTel" name="txtTel"  style="float:left;"  type="text" value="" reg-exp="^\s*$|^1[0-9]{10}$" right-msg="请填写11位数字"/> 
						</div>
						<div class="form-item">
							<span class="form-label tsl"  >QQ</span>
							<input class="form-text vali-inp" id="txtQQ" name="txtQQ"  style="float:left;"  type="text" value="" reg-exp="^\s*$|[0-9]{5,20}$" right-msg="请填写数字"/> 
						</div>
						<div class="form-item">
							<span class="form-label tsl"  >推广员</span>
							<input class="form-text vali-inp" id="txtPROMOTION_NME" name="txtPROMOTION_NME"   reg-exp="^\s*$|([\u4E00-\uFA29]|[\uE7C7-\uE7F3]|[a-zA-Z0-9_]){5,15}$" right-msg="允许5-16个字符，可用中文、数字、字母、下划线"  type="text" value=""/> 
						</div>
						<div class="form-item">
							<button type="button" id="J_BtnInfoForm" class="btn btn-large tsl"  >确　定</button> 
						</div>
					</div>
				</form>
			</div>
		</div>
	</div>
	
	
        <%=new msBsc.WebUi.Code.QtHtmlGet().GetFloorHtml()%> 
    </div>
    <!-- foot script --> 
</body>
</html>
